package org.dreamwork.jasmine2.javac;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 2010-9-25
 * Time: 10:19:32
 */
public class JasmineContext {
    public static final String JVM_Version;

    private static Pattern p_java_version = Pattern.compile ("^(\\d\\.\\d+)(.*)$");

    static {
        String s = System.getProperty ("java.specification.version");
        if (s != null) {
            Matcher m = p_java_version.matcher (s);
            if (m.matches ()) {
                JVM_Version = m.group (1);
            } else
                JVM_Version = "1.5";
        } else
            JVM_Version = "1.5";
    }
}